('0' + 11).slice(-2) // '11' ('0' + 4).slice(-2) // '04'
function pad(num, size) { num = num.toString(); while (num.length < size) num = "0" + num; return num; }